package com.healer.springcloud.service;


import com.healer.springcloud.pojo.Department;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPARTMENT",fallbackFactory =DepartmentClientServiceFallBackFactory.class)
@RequestMapping("/department")
public interface DepartmentClientService {

    @GetMapping("/adddepartment/{name}")
    boolean addDepartment(@PathVariable("name") String name);
    @PostMapping("/querydepartmentbyid")
    Department queryDepartmentById(@RequestBody Map<String,Object> map);
    @GetMapping("/querydepartment")
    List<Department> queryDepartment();
}
